Color Values
Color-component values combine to form color values. Each color value is a complete specification of a single color in a given color space. QuickDraw GX recognizes the following ten fundamental types of color values:
- CMYK color value. It contains color-component values for cyan, magenta, yellow, and black. It is defined by the
gxCMYKColor
type definition:
struct gxCMYKColor{ gxColorValue cyan; gxColorValue magenta; gxColorValue yellow; gxColorValue black; };
- RGB color value. It contains color-component values for red, green, and blue. It is defined by the gxRGBColor type definition:
struct gxRGBColor{ gxColorValue red; gxColorValue green; gxColorValue blue; };
- Alpha-channel RGB color value. It contains color-component values for red, green, and blue, plus a fourth (alpha) color-component value representing opacity. It is defined by the gxRGBAColor type definition:
struct gxRGBAColor{ gxColorValue red; gxColorValue green; gxColorValue blue; gxColorValue alpha; };
- HSV color value. It contains color-component values for hue, saturation, and value. It is defined by the gxHSVColor type definition:
struct gxHSVColor{ gxColorValue hue; gxColorValue saturation; gxColorValue value; };
- HLS color value. It contains color-component values for hue, lightness, and saturation. It is defined by the gxHLSColor type definition:
struct gxHLSColor{ gxColorValue hue; gxColorValue lightness; gxColorValue saturation; };
- XYZ color value. It contains color-component values for the X, Y, and Z tristimulus values. It is defined by the gxXYZColor type definition:
struct gxXYZColor { gxColorValue x; gxColorValue y; gxColorValue z; };
- Yxy color value. It contains color-component values for the Y, x, and y chromaticity axes. (Note that the Y component is identified in this color structure as capY.) It is defined by the gxYXYColor type definition:
struct gxYXYColor { gxColorValue capY; gxColorValue x; gxColorValue y; };
- L*u*v* color value. It contains color-component values for the L*, u*, and v* axes. It is defined by the gxLUVColor type definition:
struct gxLUVColor { gxColorValue l; gxColorValue u; gxColorValue v; };
- L*a*b* color value. It contains color-component values for the L*, a*, and b* axes. It is defined by the gxLABColor type definition:
struct gxLABColor { gxColorValue l; gxColorValue a; gxColorValue b; };
- YIQ color value. It contains color-component values for the Y, I, and Q axes. It is defined by the gxYIQColor type definition:
struct gxYIQColor{ gxColorValue y; gxColorValue i; gxColorValue q; };
- Grayscale color value. It contains a single color-component value for luminance.
- Alpha-channel grayscale color value, containing a color-component value for luminance, plus a second (alpha) color-component value representing opacity. It is defined by the gxGrayAColor type definition:
struct gxGrayAColor{ gxColorValue gray; gxColorValue alpha; };
- Indexed color value. It contains an index value (of type
gxColorIndex
) and a reference to a color set object. The color is obtained by using the index value as an offset into the color set. Indexed color is defined by thegxIndexedColor
type definition:
typedef long gxColorIndex; struct gxIndexedColor{ gxColorIndex index; gxColorSet set; };